package com.org.web.api.unishop;

import com.org.platform.model.ResultModel;
import com.org.platform.utils.LocalDateUtil;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MobileShopIndexController {

    @RequestMapping(value = {"/mobile/unishop/getCate"})
    public ResultModel getCate() {
        List<Map<String, Object>> result = new ArrayList<>();
        Map<String, Object> map = new HashMap<>();
        map.put("src", "http://www.devg.cn/static/temp/c3.png");
        map.put("name", "环球美食");
        result.add(map);
        map = new HashMap<>();
        map.put("src", "http://www.devg.cn/static/temp/c5.png");
        map.put("name", "个护美妆");
        result.add(map);
        map = new HashMap<>();
        map.put("src", "http://www.devg.cn/static/temp/c6.png");
        map.put("name", "营养保健");
        result.add(map);
        map = new HashMap<>();
        map.put("src", "http://www.devg.cn/static/temp/c7.png");
        map.put("name", "家居厨卫");
        result.add(map);
        map = new HashMap<>();
        map.put("src", "http://www.devg.cn/static/temp/c8.png");
        map.put("name", "速食生鲜");
        result.add(map);
        return ResultModel.newSuccess(result);
    }

    @RequestMapping(value = {"/mobile/unishop/getCarouselList"})
    public ResultModel getCarouselList() {
        List<Map<String, Object>> result = new ArrayList<>();
        Map<String, Object> map = new HashMap<>();
        map.put("src", "http://www.devg.cn/static/temp/banner3.jpg");
        map.put("background", "rgb(203, 87, 60)");
        result.add(map);
        map = new HashMap<>();
        map.put("src", "http://www.devg.cn/static/temp/banner2.jpg");
        map.put("background", "rgb(205, 215, 218)");
        result.add(map);
        map = new HashMap<>();
        map.put("src", "http://www.devg.cn/static/temp/banner4.jpg");
        map.put("background", "rgb(183, 73, 69)");
        result.add(map);
        return ResultModel.newSuccess(result);
    }

    @RequestMapping(value = {"/mobile/unishop/getAdd1"})
    public ResultModel getAdd1() {
        return ResultModel.newSuccess("http://www.devg.cn/static/temp/ad1.jpg");
    }

    @RequestMapping(value = {"/mobile/unishop/getSeckill"})
    public ResultModel getSeckill() {
        Map<String, Object> result = new HashMap<>();
        result.put("seckillImg", "http://www.devg.cn/static/temp/secskill-img.jpg");
        result.put("secTip", "8点场");
        result.put("secHour", "07");
        result.put("secMinute", "13");
        result.put("secSecond", "55");
        List<Map<String, Object>> goodsList = new ArrayList<>();
        Map<String, Object> good = new HashMap<>();
        good.put("image", "http://www.devg.cn/static/temp/cate13.jpg");
        good.put("title", "恒源翔春季短袖");
        good.put("price", "25.50");
        goodsList.add(good);
        good = new HashMap<>();
        good.put("image", "http://www.devg.cn/static/temp/cate14.jpg");
        good.put("title", "波司登冬季羽绒服");
        good.put("price", "59.00");
        goodsList.add(good);
        good = new HashMap<>();
        good.put("image", "http://www.devg.cn/static/temp/cate15.jpg");
        good.put("title", "夏季连衣裙");
        good.put("price", "133.88");
        goodsList.add(good);
        good = new HashMap<>();
        good.put("image", "http://www.devg.cn/static/temp/cate17.jpg");
        good.put("title", "奶粉");
        good.put("price", "235.88");
        goodsList.add(good);
        good = new HashMap<>();
        good.put("image", "http://www.devg.cn/static/temp/cate19.jpg");
        good.put("title", "儿童棉袄");
        good.put("price", "199");
        goodsList.add(good);
        result.put("secGoodsList", goodsList);
	    String secGoodsEndTime = LocalDateUtil.localDateTimeFormat(LocalDateTime.now().plusMinutes(30), LocalDateUtil.FORMAT_PATTERN1);
	    result.put("secGoodsEndTime", secGoodsEndTime);
	    return ResultModel.newSuccess(result);
    }

	@RequestMapping(value = {"/mobile/unishop/getGroup"})
	public ResultModel getGroup() {
		Map<String, Object> result = new HashMap<>();
		result.put("groupImg", "http://www.devg.cn/static/temp/h1.png");
		result.put("groupTitName", "精品团购");
		result.put("groupEnglishTitName", "Boutique Group Buying");
		List<Map<String, Object>> goodsList = new ArrayList<>();
		Map<String, Object> good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate13.jpg");
		good.put("title", "古黛妃 短袖t恤女夏装2019新款韩版宽松");
		good.put("price", "25.50");
		good.put("orignPrice", "9.99");
		good.put("groupText", "2人成团");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate16.jpg");
		good.put("title", "潘歌针织连衣裙");
		good.put("price", "59.00");
		good.put("orignPrice", "39");
		good.put("groupText", "2人成团");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate15.jpg");
		good.put("title", "巧谷2019春夏季新品新款女装");
		good.put("price", "133.88");
		good.put("orignPrice", "69.99");
		good.put("groupText", "3人成团");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate18.jpg");
		good.put("title", "私萱连衣裙");
		good.put("price", "235.88");
		good.put("orignPrice", "199.5");
		good.put("groupText", "6人成团");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate20.jpg");
		good.put("title", "娇诗茹 ulzzang原宿风学生潮韩版春夏短");
		good.put("price", "199");
		good.put("orignPrice", "99");
		good.put("groupText", "10人成团");
		goodsList.add(good);
		result.put("groupGoodsList", goodsList);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate23.jpg");
		good.put("title", "奶嘴");
		good.put("price", "199");
		good.put("orignPrice", "99");
		good.put("groupText", "10人成团");
		goodsList.add(good);
		result.put("groupGoodsList", goodsList);
		return ResultModel.newSuccess(result);
	}

	@RequestMapping(value = {"/mobile/unishop/getHotFloor"})
	public ResultModel getHotFloor() {
		Map<String, Object> result = new HashMap<>();
		result.put("hotFloorHeaderImg", "http://www.devg.cn/static/temp/h1.png");
		result.put("hotFloorTitName", "分类精选");
		result.put("hotFloorEnglishTitName", "Competitive Products For You");
		result.put("hotFloorImg", "http://www.devg.cn/static/user-bk.jpg");
		List<Map<String, Object>> goodsList = new ArrayList<>();
		Map<String, Object> good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate13.jpg");
		good.put("title", "恒源翔春季短袖");
		good.put("price", "25.50");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate14.jpg");
		good.put("title", "波司登冬季羽绒服");
		good.put("price", "59.00");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate15.jpg");
		good.put("title", "夏季连衣裙");
		good.put("price", "133.88");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate17.jpg");
		good.put("title", "奶粉");
		good.put("price", "235.88");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate19.jpg");
		good.put("title", "儿童棉袄");
		good.put("price", "199");
		goodsList.add(good);
		result.put("hotFloorGoodsList", goodsList);
		return ResultModel.newSuccess(result);
	}


	@RequestMapping(value = {"/mobile/unishop/getGuessLike"})
	public ResultModel getGuessLike() {
		Map<String, Object> result = new HashMap<>();
		result.put("guessLikeHeaderImg", "http://www.devg.cn/static/temp/h1.png");
		result.put("guessLikeTitName", "猜你喜欢");
		result.put("guessLikeEnglishTitName", "Guess You Like It");
		List<Map<String, Object>> goodsList = new ArrayList<>();
		Map<String, Object> good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate13.jpg");
		good.put("title", "恒源翔春季短袖");
		good.put("price", "25.50");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate14.jpg");
		good.put("title", "波司登冬季羽绒服");
		good.put("price", "59.00");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate15.jpg");
		good.put("title", "夏季连衣裙");
		good.put("price", "133.88");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate17.jpg");
		good.put("title", "奶粉");
		good.put("price", "235.88");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate19.jpg");
		good.put("title", "儿童棉袄");
		good.put("price", "199");
		goodsList.add(good);
		good = new HashMap<>();
		good.put("image", "http://www.devg.cn/static/temp/cate13.jpg");
		good.put("title", "恒源翔春季短袖");
		good.put("price", "25.50");
		goodsList.add(good);
		result.put("guessLikeGoodsList", goodsList);
		return ResultModel.newSuccess(result);
	}

}
